home *** CD-ROM | disk | FTP | other *** search
- /* -------------------------------------------------------------------- */
- /* Blob Rect/Rgn Installation */
- /* -------------------------------------------------------------------- */
-
- # include "BlobMgr.h"
-
-
- /*
- * Set a blob's regions. This routine makes COPIES of the regions
- * passed in, so the caller should dispose of the regions it passes
- * in itself. This routine relies on the fact that a blob should
- * never have nil handles for its regions (NewBlob installs empty
- * regions, so those regions are just changed here, not created).
- *
- * The drag region is set equal to the drag region passed in. The
- * static region is set to the difference of the static and drag
- * regions passed in.
- */
-
- pascal void
- SetBlobRgns (BlobHandle b, RgnHandle dragRgn, RgnHandle statRgn)
- {
- CopyRgn (dragRgn, (**b).dragRgn);
- DiffRgn (statRgn, dragRgn, (**b).statRgn);
- }
-
-
- /*
- * Set a blob's regions, where the regions are defined by rectangles.
- */
-
- pascal void
- SetBlobRects (BlobHandle b, Rect *dragRect, Rect *statRect)
- {
- RgnHandle dragRgn, statRgn;
-
- dragRgn = NewRgn ();
- statRgn = NewRgn ();
- RectRgn (dragRgn, dragRect);
- RectRgn (statRgn, statRect);
- SetBlobRgns (b, dragRgn, statRgn);
- DisposeRgn (dragRgn);
- DisposeRgn (statRgn);
- }
-